package com.jsj.domain;

import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.stereotype.Component;

/**
 * 相似度-记录每个提交的最大相似对象 siminfo
 */
@Component
public class Siminfo extends BaseEntity {

    /**
     * 查重id
     */
    private long id;

    /**
     * 提交
     */
    private long sourceId;

    /**
     * 对比者
     */

    private String targetId;

    /**
     * 相似度
     */

    private byte similarity;

    public Siminfo() {
    }

    public Siminfo(long id, long sourceId, String targetId, byte similarity) {
        this.id = id;
        this.sourceId = sourceId;
        this.targetId = targetId;
        this.similarity = similarity;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getSourceId() {
        return sourceId;
    }

    public void setSourceId(long sourceId) {
        this.sourceId = sourceId;
    }

    public String getTargetId() {
        return targetId;
    }

    public void setTargetId(String targetId) {
        this.targetId = targetId;
    }

    public byte getSimilarity() {
        return similarity;
    }

    public void setSimilarity(byte similarity) {
        this.similarity = similarity;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("sourceId", getSourceId())
                .append("targetId", getTargetId())
                .append("similarity", getSimilarity())
                .toString();
    }
}
